﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title></title>
	<script type="text/javascript" src="../../../Content/highlighter/scripts/shCore.js"></script>
	<script type="text/javascript" src="../../../Content/highlighter/scripts/shBrushJScript.js"></script>
	<script type="text/javascript" src="../../../Content/highlighter/scripts/shBrushCSharp.js"></script>
	<script type="text/javascript" src="../../../Content/highlighter/scripts/shBrushXml.js"></script>
	<link type="text/css" rel="stylesheet" href="../../../Content/highlighter/styles/shCore.css" />
    <link type="text/css" rel="stylesheet" href="../../../Content/highlighter/styles/shCoreEclipse.css" />
	<script type="text/javascript">SyntaxHighlighter.all();</script>
</head>
<body>
	<h3>使用parameters获取参数</h3>
	<pre class="brush:csharp;">
    using System;
    using System.Collections.Generic;
    using System.Text;
    using NFinal;

    namespace NFinalWeb3.Controllers
    {
        public class Index1Controller : BaseController
        {
            public ActionResult Index()
            {
                string UserName= this.parameters["UserName"];
                int UserAge=this.parameters["UserAge"];
                DateTime Birthday=this.parameters["Birthday"];
                return null;
            }
        }
    }
    </pre>
	<p>
		使用prarameters时，不需要手动转换数据类型。你写什么类型，他就能转成什么类型。
	</p>
</body>
</html>